Introducing *HyperVB* Version 1.0 HyperVB, developed by Data Preference, is a collection of Visual Basic form and code modules that will enable you to create multi-font formatted text controls and hypertext links within your own Visual Basic applications. These capabilities are built from pure Visual Basic code - no DLLs or VBXs are used! Just take a look at these features: Formatting Features ü Standard Font Styles Type Face , Bold , Italic, Underline, Strikethrough, Size , and Color. ü Text Shadowing Gives the appearance of Raised , Inset , or Shadowed text. The user has control over the color and depth of both an upper and lower shadow. ü Selected Text Attributes HyperVB allows users to directly assign font attributes to text selected by mouse dragging and other selection techniques. We refer to these formatted text selections as Select Items. In addition to the standard font styles and shadowing described above, the alignment of individual lines can also be controlled to allow, for example, the centering of headlines. ü Searched Text Attributes HyperVB will accept a user defined list of key search words or phrases; all occurrences of these key items in any text document opened by HyperVB will automatically be highlighted. We refer to these key items as Search Items. Each Search Item can have its own set of font attributes. ü Hypertext Links Each Select Item or Search Item can also be a Hypertext Jump Item that can be linked to code. Several of the formatted items (e.g. Data Preference) in this document are enabled hypertext jumps. You can activate them by a single mouse click. Try it! ü Global Document Formatting Any of the standard font styles can be applied to the entire document. HyperVB also provides control over line spacing, margins, alignment, display area size, and background color. Word wrapping is automatic. ü Next/Previous Search Item HyperVB includes a routine that will automatically scroll to and highlight the next or previous Search Item in a document. ü Saving Attributes All formatting (Select Items, Search Items, and global formatting) can be saved to a file which is separate from the original ASCII file. Status information, such as whether text selection is enabled, is also saved. ü Database Use With HyperVB, it is simple to add formatted hypertext documents to your database. ASCII text can be kept in memo fields, while the document's Select Items and/or Search Item list can be maintained in a separate table. ü Beyond 32K HyperVB breaks the 32K limit of the Visual Basic text box control, accepting files as large as 64K. ü WYSIWYG Printing HyperVB enables WYSIWYG printing of an entire document, selected text, or selected pages. ü Display Mode With HyperVB you can easily control the extent of user interaction. You can enable or disable scrolling, text selection, and hypertext jumps. Code Features ü Expandability Once you are familiar with the HyperVB code, you can start adding your own features. You could, for example, add rotated text, support for pictures, or support for files > 64K without too much effort. ü Shrinkability In some situations you may only need a few features provided by HyperVB. You can easily remove unwanted features thereby decreasing the size of your code, and increasing the speed of your application. If, for example, all you want to do is to color all occurrences of Search Items in a document, then you can use the special "lite" version of HyperVB which reduces the amount of code by 70%, and gives a significant boost in speed. ü No VBXs or DLLs Most Visual Basic programmers agree that third party VBX support is what makes Visual Basic so powerful. It is widely accepted, however, that you should avoid VBXs unless there is no practical way to code it yourself. There are several reasons for this:  VBXs will often have too many or too few features to meet your needs. ‚ Some VBXs have bugs that cause GPFs to occur at unpredictable times. If you have several VBXs in your application, tracking down the culprit can be very time consuming. ƒ You're stuck with any quirky behavior until the next upgrade, maybe. „ It's not uncommon for you to have to lug around over a megabyte of VBXs and DLLs for a single custom control, and … "Where did my resources go?!" L ü Plug In Code Just drop the HyperVB controls and some of the code modules into your application and you're ready to go. ü Speed Document loading, line/page scrolling, and format changes are all fast and often faster than that achievable with third party controls. Compare for yourself! ............................... The remaining HyperVB topics discussed in this document can be accessed by clicking on one of the options below. You can also scroll past this list to view these options sequentially. Menu Options << HyperVB Feature Tour >> << Exploring the HyperVB Demo on Your Own >> << Coding with HyperVB >> << Ordering Information >> << License Information >> << Distributing the HyperVB Demo >> << Exit HyperVB Demo >> HyperVB Feature Tour Note: In this tour, you will be making formatting changes that may affect the format of the entire document. To return the document to its original state, click on the "Return to Menu Options" hotspot. ............................... Global Document Formatting << Click here to enable global changes >> ............................... Select Item Formatting << Click here to enable formatting of THIS Select Item >> ............................... Search Item Formatting The Paragraph below contains the following Search Items: "adélie", "penguin", "emperor", and "Antarctic". You may click on any instance of these Search Items and then use the button bar and Search Item menu to make changes to their attributes. You can also use the Up/Down buttons on the tool bar to move from one Search Item to the next. "The Adélie Penguin, named by the French explorer, Dumont d'Urville, after his wife, is the most "penguiny" of all penguins - "the little chap in the tuxedo" - if we allow ourselves the luxury of being anthropomorphic. Except for the Emperor, it is the most truly Antarctic penguin, confined to the frozen continent and a few islands immediately adjacent. It is readily recognized by the stubby bill and white eye ring. There are many millions of these engaging gnomes in scores of colonies ringing the Antarctic continent, and concentrations of hundreds of thousands are not unusual." Excerpted from "Penguins", by Roger Tory Peterson << Return to Menu Options >> Exploring the HyperVB Demo on Your Own The HyperVB Demo is an example program that illustrates the various features available in the HyperVB code package. If you purchase HyperVB, you will also receive the code for the HyperVB Demo to help get you started. The HyperVB Demo is a valuable interface to the HyperVB code itself because it enables you to create and save formatted documents and lists of Search Items. You can make good use of the HyperVB Demo right now by utilizing its Search Item features. You can create your own Search Item list or use the one called VBLST.SRC which is provided. VBLST.SRC contains several key words relevant to the topic of Visual Basic. You may want to retrieve this list by using the File - Load Search Item List menu option, and then open up one of your text files related to Visual Basic. Your Visual Basic Directory would be a good place to start. If you want to try to push HyperVB to its limits, you can open up a large file (<64K), and then add the words "and", "or", "the", "if" etc. to the search list. You may get a few hundred Search Item hits, but HyperVB will handle it just fine. If you haven't already visited the HyperVB Feature Tour, then you might want to do that before leaving this document. To get full access to the demo, including the menus and button bar, click below. Doing this will close this document, and allow you to open up other text files on your system. Don't forget to come back to this document ("INTRO.TXT") and visit the Ordering Information section! << Let me Loose! >> << Return to Menu Options >> Coding with HyperVB HyperVB is designed so that you can drop some or all of its code modules and controls into your application and be up and running almost immediately. Its modular design will allow you to easily add or remove features as desired. You may never need to modify the code within the individual routines. Here are some details of how HyperVB is designed. Controls HyperVB uses only Standard Edition Visual Basic controls. The HyperVB Demo also uses THREED.VBX and CMDIALOG.VBX from Visual Basic Professional, but these are not required by HyperVB. HyperVB uses six Standard Edition Visual Basic controls. Of these, only a scroll bar, picture box, and shape control are visible. If your application requires only one page of formatted text, then the scroll bar can be eliminated. A timer, which is used for the flashing caret, can also be eliminated if desired. When designing your user interface, all you need to do is to size and position the shape control. HyperVB takes care of the rest. Variables, Calls, and Code HyperVB makes extensive use of the Windows API with over 25 different API functions, and nearly 20 different calls to the SendMessage function. All variables are kept at the form level. Event code is kept to a minimum. As much code as possible is placed in separate code modules. In this way, it is possible for you to have several HyperVB forms in a single application. Each HyperVB form can use the services of the HyperVB code modules. HyperVB emulates a custom control by using a user defined type containing a large number of HyperVB "properties". Here is a listing of just some of the HyperVB properties maintained in the user type: Some Familiar Ones Some Not So Familiar Ones FontSize NVisLines FontName TopVisLine FontBold LeftMargin FontItalic LineSpacing FontUnderline LineHeight Backcolor CaretX Forecolor SelRectOn Alignment MouseDrag Some of these properties such as NvisLines are read-only. Their values are set by design characteristics or user interaction. NvisLines, for example, is the number of visible lines; it can change when the display area or font style is changed. To change a property such as FontSize or FontName, you would simply set it to its new value, then call RefreshHVB. RefreshHVB will determine what properties have been changed, and then fire the appropriate events or routines. As another example, consider the task of scrolling and redrawing the text including all formatted Select Items and Search Items. This is one of the more complicated tasks to be performed. Yet all you have to do is insert a single call to the ScrollHVB subroutine in the change event of the scroll bar. The same call can be used to programmatically scroll HyperVB as was done when you used the Menu Options list in this document. Modules The code is divided among several modules: FrmHypr form module contains the required controls, event procedures, and variables. HyprGlb module contains the declarations for all user defined types, global constants, API calls as well as general HyperVB routines for scrolling, caret positioning etc. HyprSlct module contains all code specific to performing formats on Select Items. HyprSrch module contains all code specific to performing formats on Search Items. HyprPage module contains code for setting attributes for the entire document. HyprIO module contains routines for saving and retrieving text and attribute files. It also contains routines that demonstrate how to populate an Access database with formatted files and how to retrieve them to your program. You will also receive three "lite" versions of HyperVB. The first is for formatting of Select Items only. The second is for formatting of Search Items only. The third is the lightest and fastest version; it can be used to format Search Items with only the text color attribute. Other Considerations You should be aware that HyperVB does not adjust vertically or horizontally in response to changes to the font styles of Select Items or Search Items (it does adjust for global changes). HyperVB uses the space provided for the original text selection to place the formatted text. Consequently, if you choose a font size that is larger than the original, the new text may overlap surrounding text. To get around this, you can pad your Select Items with character spaces and line spaces as necessary. Search Items should probably not be assigned larger fonts since their location is not predetermined. HyperVB is not a text editor. We have written the code to provide the basics of direct text editing and it is only about 40 additional lines. However, keeping track of and refreshing the formatted text items as their location is changed or indeed as they themselves are edited is a much larger task that is beyond the scope of this product. If there is significant interest in direct text editing, we may add it to the feature set in future upgrades. << Return to Menu Options >> Ordering Information What You'll Get You will receive: ü Commented HyperVB code on a single disk. See Coding with HyperVB for details on the included code. ü HyperVB Demo source code which shows how you might build an application using HyperVB. ü A manual that outlines the structure of HyperVB, and discusses its usage. ü A user's license and registration number which entitles you to use HyperVB and to receive support by telephone or Compuserve Mail. There is a reduced rate for additional licenses for multi-developer sites. << Order Form >> << Return to Menu Options >> License Information The HyperVB code is contained on a single disk that comes in a sealed packet. It is accompanied by the following license agreement, the terms of which you must agree to in order to use HyperVB. License Agreement This is a legal agreement between you and Data Preference. By opening the sealed packet containing the HyperVB disk, you are agreeing to the terms of this agreement. If you do not agree with these terms, return the unopened disk packet and all accompanying material to Data Preference for a full refund. You are granted a license for your personal use of HyperVB. In this agreement, "use" of HyperVB is considered to occur when a person (a) places any HyperVB routines into a Visual Basic program, (b) calls a HyperVB routine from within a program, (c) reads any HyperVB code with the intent to use it or similar code, or (d) uses any routine derived from HyperVB code. Any person who performs any of these tasks is considered to be a HyperVB user and must obtain his/her own license and agree to its terms. HyperVB is owned by Data Preference and is protected by U.S. and international copyright laws. You are licensed to make changes to the original code for your own programming needs. Such modifications are considered to be derivative works of HyperVB and are also protected by U.S. and international copyright laws. Any code that you produce that is a modification of or is derived from HyperVB code is also covered under this license agreement. You are not permitted to remove the Data Preference copyright notices found in the HyperVB code, and any modified or derivative code must also contain the Data Preference copyright notice. You are licensed to distribute, royalty free, any application that you develop using HyperVB code provided that (a) you do so as an executable program only; and (b) you agree to indemnify and hold harmless Data Preference against any claims or lawsuits that arise from the use of your software product. You may make copies of the HyperVB code and written material to facilitate your personal use of it. You may not distribute HyperVB code, its derivatives, or its written material to anyone unless they themselves are a licensed HyperVB user. You may transfer ownership of HyperVB provided that (a) you transfer all HyperVB materials including all copies of disks, written material, and present and prior versions; (b) you agree not to reconstruct or create any code that could be considered a derivative of HyperVB code; and (c) the recipient agrees to the terms of this agreement. << Return to Menu Options >> HyperVB Demo Distribution Please feel free to distribute the HyperVB Demo - EXECUTABLE PROGRAM ONLY - to any interested party and to upload it to bulletin boards. If you do so, the entire set of files must be included unaltered. The required files are: HYPERVB.EXE, VBLST.SRC, INTRO.TXT, INTRO.ATR, ORDER.WRI, ORDER.TXT, THREED.VBX, and CMDIALOG.VBX. You must also make it clear to whomever may receive the HyperVB Demo that the file VBRUN300.DLL is also required. No fee may be charged for distributing the HyperVB Demo except for a reasonable media and/or shipping/handling fee. << Return to Menu Options >>